home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The See Clearly Method
/
TheSeeClearlyMethod.iso
/
Media
/
lesson4.dir
/
00025_Script_FW Rollover Member Change
< prev
next >
Wrap
Text File
|
2002-05-22
|
2KB
|
77 lines
-- DESCRIPTION --
on getBehaviorDescription me
return ¼
"ROLLOVER MEMBER CHANGE" & RETURN & RETURN & ¼
"Change the sprite's cast member when the mouse rolls over the sprite." & RETURN & RETURN & ¼
"PARAMETERS:" & RETURN & ¼
"* Rollover cast member"
end getBehaviorDescription
on getBehaviorTooltip me
return ¼
"Use with graphic members." & RETURN & RETURN & ¼
"Swaps a sprite's cast member on rollover."
end getBehaviorTooltip
-- HISTORY --
-- 22 October 1998, written for the D7 Behaviors Palette by James Newton
--
-- Modified 7 January, 2000 by T. Higgins to include the isOKToAttach
-- event handler along with removing some redundant error checking.
-- 5 March 2000: Modified to match Fireworks button order
-- and be D7 and D8 compatible for Fireworks Importer <jba>
property spriteNum
property mySprite
property myStandardMember
property myRollovermember
on beginSprite me
mySprite = sprite (me.spriteNum)
myStandardMember = mySprite.member
if myRollovermember = 0 then myRollovermember = member(mySprite.member.number+1)
end
on mouseEnter me
mySprite.member = myRolloverMember
cursor 280
end mouseEnter
on mouseLeave me
mySprite.member = myStandardMember
cursor 0
end mouseLeave
on isOKToAttach (me, aSpriteType, aSpriteNum)
case aSpriteType of
#graphic:
return TRUE
#script:
return FALSE
end case
end isOKToAttach
on getPropertyDescriptionList
if the currentSpriteNum = 0 then exit
theMember = sprite(the currentSpriteNum).member
theMemberNumber = theMember.number
return ¼
[ ¼
#myRolloverMember: ¼
[ ¼
#comment: "Display which member on rollover?", ¼
#format: #graphic, ¼
#default: member (theMemberNumber + 1) ¼
] ¼
]
end getPropertyDescriptionList